package com.amigo.online.provider.adv.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.amigo.online.provider.adv.mapper.AdvAreaMapper;
import com.amigo.online.provider.adv.service.AreaService;
import com.amigo.online.provider.adv.util.LanguageEnum;


@Service
public class AreaServiceImpl implements AreaService {

    @Autowired
    AdvAreaMapper advAreaMapper;

    @Override
    public Integer getPositionAreaIdByCityName(String cityName, String language) {
        Integer result = null;
        if (language != null) {
            language = LanguageEnum.getColumnName(language);
            if (language != null) {
                result = advAreaMapper.getAreaByCityName(cityName, language);
            }
        }
        return result;
    }

}
